﻿// Copyright Microsoft

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Microsoft.Samples.SqlServer.Workflow.Designer
{
  /// <summary>
  /// Interaction logic for ExpressionEditorUserControl.xaml
  /// </summary>
  public partial class ExpressionEditorUserControl : UserControl
  {
    public event TextChangedEventHandler TextChanged;
    public event EventHandler UnloadHost;
   
    public ExpressionEditorUserControl()
    {
      InitializeComponent();
    }

    private void RichTextBox_TextChanged(object sender, TextChangedEventArgs e)
    {
      if (TextChanged != null)
        TextChanged(sender, e);
    }

    private void Close_Click(object sender, RoutedEventArgs e)
    {
      if (UnloadHost != null)
        UnloadHost(this, null);
    }
  }
}
